<div id="urHere">DouPHP 管理中心<b>></b><strong>文章管理</strong> </div>
<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        <h3><a href="{:U('/ActInfo/addArt')}" class="actionBtn add">添加文章</a>文章列表</h3>
    <div class="filter">
    <form action="{:U('index')}" method="get">
     <input name="keyword" type="text" class="inpMain" value="{:I('get.keyword')}" placeholder="活动名、主办方" size="30" />
        <select name="search">
            <option value="" <if condition="I('get.search') neq 1 and I('get.search') neq 2"> selected="selected" </if>>--活动类别--</option>
            <option value="1" <if condition="I('get.search') eq 1 "> selected="selected" </if>>--收费--</option>
            <option value="2" <if condition="I('get.search') eq 2 "> selected="selected"</if>>--免费--</option>
        </select>
     <input name="submit" class="btnGray" type="submit" value="筛选" />
        <!--<button type="submit" class="btnGray" type="submit">搜 索</button>-->
    </form>
    </div>
        <div id="list">
    <form name="action" method="post" action="article.php?rec=action">
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
     <tr>
         <th width="22" align="center"><input name='chkall' type='checkbox' id='chkall' onclick='selectcheckbox(this.form)' value='check'></th>
         <th width="40" align="center">编号</th>
         <th align="center">活动名称</th>
         <th align="center">活动费用(元)</th>
         <th align="center">活动开始时间</th>
         <th align="center">活动结束时间</th>
         <th align="center">报名开始时间</th>
         <th align="center">截止报名时间</th>
         <th align="center">活动类别</th>
         <th align="center">主办方</th>
         <th align="center">参加人数限制</th>
         <th align="center">活动地址</th>
         <th align="center">操作</th>
     </tr>
        <foreach name="data" item="val">
            <tr>
                <td width="22" align="center">
                    <input name='chkall' type='checkbox' onclick='selectcheckbox(this.form)' value='check'>
                </td>
                <td width="40" align="center">
                    {$val['act_id']}
                </td>
                <td align="center">
                    {$val['act_tittle']}
                </td>
                <!--<td align="center">-->
                    <!--{$val['act_decribe']}-->
                <!--</td>-->
                <!--<td align="center">-->
                    <!--{$val['act_img']}-->
                <!--</td>-->
                <td align="center">
                    {$val['act_price']}
                </td>
                <td align="center">
                    {$val['act_start_time']}
                </td>
                <td align="center">
                    {$val['act_stop_time']}
                </td>
                <td align="center">
                    {$val['start_time']}
                </td>
                <td align="center">
                    {$val['end_time']}
                </td>
                <td align="center">
                    <if condition="$val['act_type_code'] eq 1"> 收费
                        <elseif condition="$val['act_type_code'] eq 2"/> 免费
                        <else /> 滚蛋
                    </if>
                </td>
                <td align="center">
                    {$val['act_organizer']}
                </td>
                <td align="center">
                    {$val['act_joiner_num']}
                </td>
                <td align="center">
                    {$val['act_address']}
                </td>
                <td align="center">
                    <a href="{:U('modArt', array('act_id'=>$val['act_id']))}">编辑</a>
                    <a href="javascript:void(0);" data-id="{$val['act_id']}" class="delAct">删除</a>
                </td>
            </tr>
        </foreach>

    </table>

    </form>
    </div>
    <div class="clear"></div>
    <div class="pager">
        {$show}
    </div>
 </div>


 <script type="text/javascript">

     $(function(){
         $('a.delAct').click(function(){
             if (confirm('确定要删除？')) {
                 var id = $(this).attr('data-id');
                 window.location.href = "/ActInfo/delArt/act_id/"+id;
             }
         })
     });

 onload = function()
 {
   document.forms['action'].reset();
 }

 function douAction()
 {
     var frm = document.forms['action'];

     frm.elements['new_cat_id'].style.display = frm.elements['action'].value == 'category_move' ? '' : 'none';
 }

 </script>

